<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        /* 
            定义一个比较长的字符串
            const str1 = This is a very long string which needs \to wrap across multiple lines because \otherwise my code is unreadable.";

            
         */
         //方式一：为了代码观看方便，可以使用 + 号进行拼接
         const str1 = "This is a very long string which needs"+ 
         "to wrap across multiple lines because otherwise my code is unreadable.";

         console.log(str1)


         //方式二：可以使用 \ 进行拼接
         const str2 = "This is a very long string which needs  \
to wrap across multiple lines because otherwise my code is unreadable.";
         console.log(str2)


         


    </script>
</head>
<body>
    
</body>
</html>